//
//  CoreHeader.h
//  Dingdong
//
//  Created by 程强 on 16/11/11.
//  Copyright © 2016年 程强. All rights reserved.
//

#ifndef CoreHeader_h
#define CoreHeader_h

#define LoadImage(file) [UIImage imageNamed:file]
//拉伸图片
#define StretchImage(name) ([ToolKit stretchImage:name])
#define StretchHorizontalImage(name) ([ToolKit stretchLongImage:name])
// 屏幕尺寸
#define ScreenWidth      [[UIScreen mainScreen]bounds].size.width
#define ScreenHeight      [[UIScreen mainScreen]bounds].size.height

// 3.5英寸 4英寸 4.7英寸 5.5英寸
#define ScreenInch35 (ScreenWidth == 320 && ScreenHeight == 480)
#define ScreenInch4 (ScreenWidth == 320 && ScreenHeight == 568)
#define ScreenInch47 (ScreenWidth == 375 && ScreenHeight == 667)
#define ScreenInch55 (ScreenWidth == 414 && ScreenHeight == 736)
// 小屏 中屏 大屏
#define ScreenInchSmall (ScreenWidth < 375 && ScreenHeight < 667)
#define ScreenInchMiddle ScreenInch47
#define ScreenInchLarge ScreenInch55

#define weak_Self(id) __weak typeof(id) weakSelf = id

#define StoryBoardViewController(sbName,sbID)   [[UIStoryboard storyboardWithName:sbName bundle:[NSBundle mainBundle]]instantiateViewControllerWithIdentifier:sbID];

#define RGBColor(r,g,b)  [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]

#define kRedColor  RGBColor(255,80,80)
#define NAVBAR_CHANGE_POINT 50

#define FormatString(format,a...) [NSString stringWithFormat:format,a]
#define ValidString(str) [NOValidateHelper validateString:str]
#define NumberToString(number) [NSString stringWithFormat:@"%@",number]

#ifdef DEBUG
#define KKLog(...) NSLog(@"%s 第%d行 \n %@\n\n",__func__,__LINE__,[NSString stringWithFormat:__VA_ARGS__])
#else
#define KKLog(...)
#endif

#endif /* CoreHeader_h */
